\(\int \sqrt {1-x} x \sqrt {1+x} \, dx\) [849]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F]
   Maxima [A] (verification not implemented)
   Giac [B] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 18, antiderivative size = 20 \[ \int \sqrt {1-x} x \sqrt {1+x} \, dx=-\frac {1}{3} (1-x)^{3/2} (1+x)^{3/2} \]

[Out]

-1/3*(1-x)^(3/2)*(1+x)^(3/2)

Rubi [A] (verified)

Time = 0.00 (sec) , antiderivative size = 20, normalized size of antiderivative = 1.00, number of steps used = 1, number of rules used = 1, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.056, Rules used = {75} \[ \int \sqrt {1-x} x \sqrt {1+x} \, dx=-\frac {1}{3} (1-x)^{3/2} (x+1)^{3/2} \]

[In]

Int[Sqrt[1 - x]*x*Sqrt[1 + x],x]

[Out]

-1/3*((1 - x)^(3/2)*(1 + x)^(3/2))

Rule 75

Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Simp[b*(c + d*x)^
(n + 1)*((e + f*x)^(p + 1)/(d*f*(n + p + 2))), x] /; FreeQ[{a, b, c, d, e, f, n, p}, x] && NeQ[n + p + 2, 0] &
& EqQ[a*d*f*(n + p + 2) - b*(d*e*(n + 1) + c*f*(p + 1)), 0]

Rubi steps \begin{align*} \text {integral}& = -\frac {1}{3} (1-x)^{3/2} (1+x)^{3/2} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.00 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.75 \[ \int \sqrt {1-x} x \sqrt {1+x} \, dx=-\frac {1}{3} \left (1-x^2\right )^{3/2} \]

[In]

Integrate[Sqrt[1 - x]*x*Sqrt[1 + x],x]

[Out]

-1/3*(1 - x^2)^(3/2)

Maple [A] (verified)

Time = 1.44 (sec) , antiderivative size = 15, normalized size of antiderivative = 0.75

method result size
gosper \(-\frac {\left (1-x \right )^{\frac {3}{2}} \left (1+x \right )^{\frac {3}{2}}}{3}\) \(15\)
default \(\frac {\sqrt {1-x}\, \sqrt {1+x}\, \left (x^{2}-1\right )}{3}\) \(20\)
risch \(-\frac {\sqrt {\left (1+x \right ) \left (1-x \right )}\, \sqrt {1+x}\, \left (x^{2}-1\right ) \left (-1+x \right )}{3 \sqrt {1-x}\, \sqrt {-\left (-1+x \right ) \left (1+x \right )}}\) \(44\)

[In]

int(x*(1-x)^(1/2)*(1+x)^(1/2),x,method=_RETURNVERBOSE)

[Out]

-1/3*(1-x)^(3/2)*(1+x)^(3/2)

Fricas [A] (verification not implemented)

none

Time = 0.22 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.95 \[ \int \sqrt {1-x} x \sqrt {1+x} \, dx=\frac {1}{3} \, {\left (x^{2} - 1\right )} \sqrt {x + 1} \sqrt {-x + 1} \]

[In]

integrate(x*(1-x)^(1/2)*(1+x)^(1/2),x, algorithm="fricas")

[Out]

1/3*(x^2 - 1)*sqrt(x + 1)*sqrt(-x + 1)

Sympy [F]

\[ \int \sqrt {1-x} x \sqrt {1+x} \, dx=\int x \sqrt {1 - x} \sqrt {x + 1}\, dx \]

[In]

integrate(x*(1-x)**(1/2)*(1+x)**(1/2),x)

[Out]

Integral(x*sqrt(1 - x)*sqrt(x + 1), x)

Maxima [A] (verification not implemented)

none

Time = 0.30 (sec) , antiderivative size = 11, normalized size of antiderivative = 0.55 \[ \int \sqrt {1-x} x \sqrt {1+x} \, dx=-\frac {1}{3} \, {\left (-x^{2} + 1\right )}^{\frac {3}{2}} \]

[In]

integrate(x*(1-x)^(1/2)*(1+x)^(1/2),x, algorithm="maxima")

[Out]

-1/3*(-x^2 + 1)^(3/2)

Giac [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 43 vs. \(2 (14) = 28\).

Time = 0.29 (sec) , antiderivative size = 43, normalized size of antiderivative = 2.15 \[ \int \sqrt {1-x} x \sqrt {1+x} \, dx=\frac {1}{6} \, {\left ({\left (2 \, x - 5\right )} {\left (x + 1\right )} + 9\right )} \sqrt {x + 1} \sqrt {-x + 1} + \frac {1}{2} \, \sqrt {x + 1} {\left (x - 2\right )} \sqrt {-x + 1} \]

[In]

integrate(x*(1-x)^(1/2)*(1+x)^(1/2),x, algorithm="giac")

[Out]

1/6*((2*x - 5)*(x + 1) + 9)*sqrt(x + 1)*sqrt(-x + 1) + 1/2*sqrt(x + 1)*(x - 2)*sqrt(-x + 1)

Mupad [B] (verification not implemented)

Time = 1.11 (sec) , antiderivative size = 19, normalized size of antiderivative = 0.95 \[ \int \sqrt {1-x} x \sqrt {1+x} \, dx=\frac {\left (x^2-1\right )\,\sqrt {1-x}\,\sqrt {x+1}}{3} \]

[In]

int(x*(1 - x)^(1/2)*(x + 1)^(1/2),x)

[Out]

((x^2 - 1)*(1 - x)^(1/2)*(x + 1)^(1/2))/3